﻿<%@ Page Title="" Language="C#" MasterPageFile="~/shop/MasterPage.master" AutoEventWireup="true" CodeFile="QueryOrder.aspx.cs" Inherits="shop_QueryOrder" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .auto-style5 {
            margin-left: 2px;
        }
        .auto-style6 {
            width: 100%;
        }
        .auto-style7 {
            text-align: left;
            width: 754px;
        }
        .auto-style8 {
            margin-left: 29px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues" ConnectionString="<%$ ConnectionStrings:keshe2ConnectionString %>" DeleteCommand="DELETE FROM [订单表] WHERE [客户编号] = @original_客户编号 AND [订单编号] = @original_订单编号 AND [商品编号] = @original_商品编号 AND [创建时间] = @original_创建时间 AND [数量] = @original_数量 AND [总价] = @original_总价 AND [订单状态] = @original_订单状态" InsertCommand="INSERT INTO [订单表] ([订单编号], [客户编号], [商品编号], [创建时间], [数量],[总价], [订单状态]) VALUES (@订单编号, @客户编号, @商品编号, @创建时间, @数量,@总价, @订单状态)" OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT 订单.订单编号, 客户.客户名, 商品.商品名称, 订单.创建时间, 订单.数量, 订单.总价, 订单.订单状态,收货状态 FROM 订单 INNER JOIN 客户 ON 订单.客户编号 = 客户.客户编号 INNER JOIN 商品 ON 订单.商品编号 = 商品.商品编号" UpdateCommand="UPDATE [订单] SET [订单状态] = @订单状态 WHERE [订单编号] = @original_订单编号 AND [商品编号] = @original_商品编号 AND [创建时间] = @original_创建时间 AND [数量] = @original_数量 AND [订单状态] = @订单状态 AND [收货状态] = @original_收货状态">
        <DeleteParameters>
            <asp:Parameter Name="original_客户编号" Type="Int64" />
            <asp:Parameter Name="original_订单编号" Type="Int64" />
            <asp:Parameter Name="original_商品编号" Type="String" />
            <asp:Parameter Name="original_创建时间" Type="Object" />
            <asp:Parameter Name="original_数量" Type="Int64" />
            <asp:Parameter Name="original_总价" />
            <asp:Parameter Name="original_订单状态" Type="Boolean" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="订单编号" Type="Int64" />
            <asp:Parameter Name="客户编号" Type="Int64" />
            <asp:Parameter Name="商品编号" Type="String" />
            <asp:Parameter Name="创建时间" Type="Object" />
            <asp:Parameter Name="数量" Type="Int64" />
            <asp:Parameter Name="总价" />
            <asp:Parameter Name="订单状态" Type="Boolean" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="订单状态" Type="Boolean" />
            <asp:Parameter Name="original_订单编号" Type="Int64" />
            <asp:Parameter Name="original_商品编号" Type="String" />
            <asp:Parameter Name="original_创建时间" Type="Object" />
            <asp:Parameter Name="original_数量" Type="Int64" />
            <asp:Parameter Name="original_收货状态" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <table class="auto-style6">
        <tr>
            <td class="auto-style7">
                    <asp:Label ID="Label2" runat="server" Text="查询类别"></asp:Label>
                    &nbsp;<asp:DropDownList ID="DropDownList1" runat="server">
                    <asp:ListItem>订单编号</asp:ListItem>
                    <asp:ListItem>客户名</asp:ListItem>
                    <asp:ListItem>商品名称</asp:ListItem>
                </asp:DropDownList>
                    &nbsp;<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    &nbsp;
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="查询" />
                <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="返回" CssClass="auto-style8" />
            &nbsp;&nbsp;
                </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="2">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" Height="222px" Width="1081px" CssClass="auto-style5" DataKeyNames="订单编号" AllowPaging="True">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="订单编号" HeaderText="订单编号" SortExpression="订单编号" InsertVisible="False" ReadOnly="True" />
            <asp:BoundField DataField="客户名" HeaderText="客户名" SortExpression="客户名" />
            <asp:BoundField DataField="商品名称" HeaderText="商品名称" SortExpression="商品名称" />
            <asp:BoundField DataField="创建时间" HeaderText="创建时间" SortExpression="创建时间" />
            <asp:BoundField DataField="数量" HeaderText="数量" SortExpression="数量" />
            <asp:BoundField DataField="总价" HeaderText="总价" SortExpression="总价" />
            <asp:CheckBoxField DataField="订单状态" HeaderText="配货状态" SortExpression="订单状态" />
            <asp:CheckBoxField DataField="收货状态" HeaderText="收货状态" ReadOnly="True" SortExpression="收货状态" />
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
            </td>
        </tr>
    </table>
    </div>
</asp:Content>

